#ifndef SMILEYTHEME_H_
#define SMILEYTHEME_H_

#include <wx/string.h>
#include <wx/bitmap.h>
#include <wx/log.h>
#include <map>

#include "../StdUserInterfaceModule/interfaces/iSmileyThemeManager.h"


namespace Impp
{

struct Smiley{
	wxString regExp;
	wxBitmap bitmap;
};

class SmileyTheme
{
private:
	std::map<int, Smiley> smileys;

public:
	SmileyTheme();
	virtual ~SmileyTheme();

	wxString getRegExpString();
	wxBitmap* getBitmap(const wxString & smiley);

};


class StdSmileyThemeManager : public iSmileyThemeManager{

	DECLARE_DYNAMIC_CLASS(StdSmileyThemeManager)

private:
	SmileyTheme* theme;

public:
	StdSmileyThemeManager() :
		theme(NULL){};
	~StdSmileyThemeManager(){};

	virtual void moduleInit(){
		theme = new SmileyTheme();
	};
	virtual void moduleDestroy(){
		if(theme != NULL){
			delete theme;
		}
	};

	wxString getRegExpString(){
		wxASSERT(theme!=NULL);
		return theme->getRegExpString();
	}
	wxBitmap* getBitmap(const wxString & smiley){
		wxASSERT(theme!=NULL);
		return theme->getBitmap(smiley);
	}

};

}

#endif /*SMILEYTHEME_H_*/
